package com.zm.se.listenner;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.zm.se.entity.Emp;
import com.zm.se.mapper.managerMapper.ManagerMapper;


public class EmpExcelListener extends AnalysisEventListener<Emp> {
    private ManagerMapper mapper;

    public EmpExcelListener(ManagerMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public void invoke(Emp emp, AnalysisContext analysisContext) {
        System.out.println(emp);
        System.out.println(mapper.InsertTeacher(emp));
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("finish");
    }
}
